<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>使用单行注释来防止执行</title>
</head>

<body>
    <h1 id="myH1"></h1>
    <p id="myP"></p>
    <script>
        //document.getElementById("myH1").innerHTML="欢迎来到我的主页";
        document.getElementById("myP").innerHTML = "这是我的第一个段落。";
    </script>
    <p><strong>注意:</strong> 注释块不会被执行</p>
</body>

</html>